using System.Collections.Generic;

public class Table_CharModelItem
{
    /// <summary>
    /// 唯一ID
    /// <summary>
    public int Id { get; private set; }
    /// <summary>
    /// 名称
    /// <summary>
    public string Name { get; private set; }
    /// <summary>
    /// 资源路径
    /// <summary>
    public string ResPath { get; private set; }
    /// <summary>
    /// 动作路径
    /// <summary>
    public string AnimPath { get; private set; }
    /// <summary>
    /// 头像
    /// <summary>
    public string HeadPic { get; private set; }
    /// <summary>
    /// 头顶信息板高度修正
    /// <summary>
    public float HeadInfoHeight { get; private set; }
    /// <summary>
    /// 缩放比例
    /// <summary>
    public float Scale { get; private set; }
    /// <summary>
    /// 死亡音效
    /// <summary>
    public int DeadSound { get; private set; }
    /// <summary>
    /// 骨骼模型类别
    /// <summary>
    public int ModelType { get; private set; }

    public Table_CharModelItem(ExcelLineReader reader)
    {
        Id = reader.ReadInt();
        Name = reader.ReadString();
        ResPath = reader.ReadString();
        AnimPath = reader.ReadString();
        HeadPic = reader.ReadString();
        HeadInfoHeight = reader.ReadFloat();
        Scale = reader.ReadFloat();
        DeadSound = reader.ReadInt();
        ModelType = reader.ReadInt();
    }
}

public class Table_CharModelMgr : IDataMgr
{
    protected override string FileName { get { return "Txt/CharModel.txt"; } }

    protected List<Table_CharModelItem> mItemList = new List<Table_CharModelItem>();
    public Table_CharModelItem GetItemByIdx(int idx)
    {
        return mItemList[idx];
    }
    public Table_CharModelItem GetItemById(int id)
    {
        int idx = GetIdxById(id);
        return GetItemByIdx(idx);
    }

    public override void Load(ExcelLineReader reader)
    {
        var item = new Table_CharModelItem(reader);
        mItemDic.Add(item.Id, mDataCount);
        mItemList.Add(item);
    }
}